import { Rule } from "./types";

export const TryceratopsRuleList: Rule[] = [
    {
        code: "TRY002",
        name: "raise-vanilla-class",
        descEn: "Create your own exception",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY003",
        name: "raise-vanilla-args",
        descEn: "Avoid specifying long messages outside the exception class",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY004",
        name: "type-check-without-type-error",
        descEn: "Prefer TypeError exception for invalid type",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY200",
        name: "reraise-no-cause",
        descEn: "Use raise from to specify exception cause",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY201",
        name: "verbose-raise",
        descEn: "Use raise without specifying exception name",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY300",
        name: "try-consider-else",
        descEn: "Consider moving this statement to an else block",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY301",
        name: "raise-within-try",
        descEn: "Abstract raise to an inner function",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY400",
        name: "error-instead-of-exception",
        descEn: "Use logging.exception instead of logging.error",
        descCn: "",
        autoFix: false,
    },
    {
        code: "TRY401",
        name: "verbose-log-message",
        descEn: "Redundant exception object included in logging.exception call",
        descCn: "",
        autoFix: false,
    },
];